package cn.lixin.user.contain;

public class UserConstants {

    //注册业务验证码前缀
    public static final String BUSINESS_REGISTER_PREFIX = "business_register_prefix:";


    public static final String BUSINESS_LOGIN_PREFIX = "business_login_prefix:";


    public static final String BUSINESS_BINDER_PREFIX="business_binder_prefix:";


    //=================微信登录相关的常量
    public static final String APPID="wxd853562a0548a7d0";
    public static final String SECRET="4a5d5615f93f24bdba2ba8534642dbb6";
    public static final String WXUSER_GET_TOKEN_URL="https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
    public static final String WXUSER_GET_USER_URL="https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID";

/*
 *  第一次请求  HttpClientUtils.httpGet(getTokenUrl);
 *  https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&
 *       secret=SECRET&code=CODE&grant_type=authorization_code
 *  通过code获取access_token
         {
        "access_token":"ACCESS_TOKEN",
        "expires_in":7200,
        "refresh_token":"REFRESH_TOKEN",
        "openid":"OPENID",
        "scope":"SCOPE",
        "unionid": "o6_bmasdasdsad6_2sgVt7hMZOPfL"
        }
 *
 *  第二次请求  HttpClientUtils.httpGet(getUserUrl);
 *  https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID
 *  通过token+openId 获取微信用户信息
        {
        "openid":"OPENID",
        "nickname":"NICKNAME",
        "sex":1,
        "province":"PROVINCE",
        "city":"CITY",
        "country":"COUNTRY",
        "headimgurl": "https://thirdwx.qlogo.cn/mmopen/g3MonUZtNHkdmzicIlibx6iaFqAc56vxLSUfpb6n5WKSYVY0ChQKkiaJSgQ1dZuTOgvLLrhJbERQQ4eMsv84eavHiaiceqxibJxCfHe/0",
        "privilege":[
        "PRIVILEGE1",
        "PRIVILEGE2"
        ],
        "unionid": " o6_bmasdasdsad6_2sgVt7hMZOPfL"
        }
 */

    //=================微信登录相关的常量
}